import request from '@/utils/request'

export function pageList(queryParams) {
  return request({
    url: 'company/pageList',
    method: 'get',
    params: queryParams
  })
}

export function save(data) {
  return request({
    url: 'company/save',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: `company/update`,
    method: 'post',
    data
  })
}

export function detail(id) {
  return request({
    url: `company/detail/${id}`,
    method: 'get'
  })
}

export function deleted(id) {
  return request({
    url: `company/delete/${id}`,
    method: 'post'
  })
}

export function exist(data) {
  return request({
    url: 'company/exist',
    method: 'post',
    data: {name: data.name}
  })
}
